<template>
  <div>
    app
    <p @click="change">{{msg}}</p>
  </div>
</template>
<script>
// ref 就是一个组合式API  
import { onMounted } from 'vue';
export default {
  setup () {
    console.log('在setup')
    console.log(this);
    onMounted(()=> {
      console.log('在mounted中')
    })
    const msg = '我是vue3'
    const change = () => {
      console.log(msg)
    }
      return {
        msg,
        change
      }
  },
  beforeCreate () {
    console.log(this)
    console.log('在beforeCreate中')
  }
};
</script>
